package com.fshuqing.learing.spring.bean;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author fshuqing
 */
@Configuration
public class UserConfigruation {


    @Bean
    public User createUser() {
        // 默认发返回的对象为方法名字
        return new User();
    }

    @Bean("user1")
    public User newUser() {
        return new User("aa");
    }
//
//    @Bean("bank")
//    public SecondApplicationContext newBank() {
//        return new SecondApplicationContext();
//    }
}
